From: Paul Donald Date: Mon, 3 Nov 2025 21:34:08 +0000 (+0100) Subject: luci-mod-network: dynamically find mode and bssid positions X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22%24PHP_SELF/%22https:/collectd.org/%22%24PHP_SELF?a=commitdiff_plain;h=fd96244e7977c4fb3dc410957f5d634f8561ce05;p=project%2Fluci.git luci-mod-network: dynamically find mode and bssid positions Dynamically find the mode and bssid position assignments in case their position should change later. Signed-off-by: Paul Donald --- diff --git a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js index 1bd192b325..6d107dae11 100644 --- a/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js +++ b/modules/luci-mod-network/htdocs/luci-static/resources/view/network/wireless.js @@ -1117,8 +1117,8 @@ return view.extend({ let encr; if (hwtype == 'mac80211') { - const mode = ss.children[0]; - const bssid = ss.children[5]; + const mode = ss.children.find(obj => obj.option === 'mode'); + const bssid = ss.children.find(obj => obj.option === 'bssid'); if (have_mesh) mode.value('mesh', '802.11s'); mode.value('ahdemo', _('Pseudo Ad-Hoc (ahdemo)'));